package com.nuedu.corejava.ch7.homework2;

public class ComputerStudent extends Student {

	private double operating;
	private double writing;

	public ComputerStudent(double operating, double writing) {
		super();
		this.operating = operating;
		this.writing = writing;
	}

	public ComputerStudent() {
		super();
	}

	public ComputerStudent(int studentId, String name, String sex, int age, double operating, double writing,
			double midtermGrade, double finalExame) {
		super(studentId, name, sex, age, midtermGrade, finalExame);
		this.operating = operating;
		this.writing = writing;
	}

	@Override
	public double gradeAssessing() {
		double grade=operating*0.4+(writing+getFinalExame()+getMidtermGrade())*0.2;
		return grade;
	}

}
